package model

type UserFile struct {
	Id       int64  `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT"`
	UserName string `gorm:"column:user_name;type:varchar(64);not null;key:user_name"`
	FileHash string `gorm:"column:file_sha1;type:varchar(64);not null;default:''"`
	FileName string `gorm:"column:file_name;type:varchar(256);not null;default:''"`
	FileSize int64  `gorm:"column:file_size;type:bigint(20);default:0"`
	UploadAt string `gorm:"column:upload_at;type:datetime;not null"`
	UpdateAt string `gorm:"column:last_update;type:datetime;not null"`
	Status   int    `gorm:"column:status;type:int(11);not null;default:0;key:status"`
}

func (UserFile) TableName() string {
	return "tbl_user_file"
}
